package com.fz.dao;

import com.fz.entity.Book;
import com.fz.mapper.BookMapper;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by webrx on 2017-09-11.
 */
@Data @Service
public class BookDAO implements BookMapper {
    @Autowired
    private BookMapper dao;
    public Book queryById(int id) {
        return dao.queryById(id);
    }

    public List<Book> queryAll() {
        return dao.queryAll();
    }

    public int add(Book book) {
        return dao.add(book);
    }

    public int save(String n, double p, String date) {
        return dao.save(n,p,date);
    }

    public int delById(int id) {
        return dao.delById(id);
    }
}
